Indonesia is the largest country in Southeast Asia. Rice is the primary staple food crop with a steady increase in annual production, making Indonesia the third largest rice producer in the world. 93% of Indonesia’s total number of farmers are small family farms. Rice is the main crop grown and staple food in Southeast Asia.(Yoshida (1981)) Crop rotation is the practice of planting different crops sequentially on the same plot of land to improve soil health, optimize nutrients in the soil, and combat pest and weed pressure.(Crystal and Whittlesey (2004)) Soybean is a species of legume native to East Asia, widely grown for its edible bean which has numerous uses.(Wright et al. (2005)) Chili is a plant of tropical and subtropical regions for their fleshy fruits.(MOALF (2016))
This project will analyse the decision of crop rotation (soybean and chili) with rice farming. Total cost is calculated for each crop, which consists of labor, seeds, pesticides, fertilizer, machinery and rent land. The revenues is calculated for each crop production by multiplying the yield of each crop by the selling price of each crop per ha. The total cost, revenues and discount rate are used as variable estimates in order to calculate the Net Present Value (NVP).
Variable for rice farm and crop rotation for small holder farmers in Indonesia have 8 mains variables that are consist of rice production, rice cultivation cost, soybean production, soybean cultivation cost, chili production, chili cultivation cost, discount rate and year of system. Overall, there are 33 variables that are used for this decision analysis.
####Source: BPS (2018), Mucharam et al. (2020), Jagung (2017), Fao (2018), BPS (2022), Amirrullah (2019), Crystal and Whittlesey (2004), Jagung (2017), BRIN (2022), USDA (2012), Setiartiti (2021), Antriyandarti (2015), Krisdiana et al. (2021), Harsono et al. (2020), Schilling (1999), Wandschneider et al. (2019), Sundari et al. (2021)
NPV (Net Present Value): In financial terms, the NPV
the measurement of the profitability of a project or programme. This is
achieved by subtracting the current values of expenditure from the
current values of income over a period of time. Income can be referred
to as benefit and expenditure can be referred to as cost.
Discount Rate: The discount rate is the interest rate used in analysis of discounted cash flow (DCF).
Stantec (2005)
Do, Luedeling, and Whitney (2020)
crop_rotation_decision <- function(){
# Estimate the income of rice in a normal season
rice_income <- vv(rice_yield * rice_price, n=n_year, var_CV=100)
# Estimate the income of soybean in a normal season
soybean_income <- vv(soybean_yield * soybean_price, n=n_year, var_CV=100)
# Estimate the income of chili in a normal season
chili_income <- vv(chili_yield * chili_price, n=n_year, var_CV=100)
#Estimate the cost of rice farm in a normal season
rice_cost_precal <- sum(rice_land_rental_cost, rice_seeds_cost, rice_fertilizer_cost,
rice_pesticide_cost, rice_machinery_cost, rice_harvesting_cost)
rice_cost <- vv(rice_cost_precal, n=n_year, var_CV=100)
#Estimate the cost of soybean farm in a normal season
soybean_cost_precal <- sum(soybean_land_rental_cost, soybean_seeds_cost, soybean_fertilizer_cost,
soybean_pesticide_cost, soybean_machinery_cost, soybean_harvesting_cost)
soybean_cost <- vv(soybean_cost_precal, n=n_year, var_CV=100)
#Estimate the cost in a normal season
chili_cost_precal <- sum(chili_land_rental_cost, chili_seeds_cost, chili_fertilizer_cost,
chili_pesticide_cost, chili_machinery_cost, chili_harvesting_cost)
chili_cost <- vv(chili_cost_precal, n=n_year, var_CV=100)
# Estimate the profit
rice_profit <- vv(rice_income - rice_cost, n=n_year, var_CV=100)
soybean_profit <- vv(soybean_income - soybean_cost, n=n_year, var_CV=100)
chili_profit <- vv(chili_income - chili_cost, n=n_year, var_CV=100)
# Final result
#assuming rice cultivation is 3 times per year
rice_cultivation_result = vv(rice_profit*3, n=n_year, var_CV=100)
#crop rotation decision scenario
#if crop rotation of 3 crops is done in one year
crop_rotation_result = vv(rice_profit + soybean_profit + chili_profit, n=n_year, var_CV=100)
#if crop rotation of rice and soybean is done in one year (rice-soybean-rice)
rice_soybean_result = vv((rice_profit*2) + soybean_profit, n=n_year, var_CV=100)
#if crop rotation of rice and chili is done in one year (rice-chili)
rice_chili_result = vv(rice_profit + chili_profit, n=n_year, var_CV=100)
# NPV
NPV_rice <- discount(rice_cultivation_result, discount_rate, calculate_NPV = TRUE)
NPV_crop_rotation <- discount(crop_rotation_result, discount_rate, calculate_NPV = TRUE)
NPV_rice_soybean <- discount(rice_soybean_result, discount_rate, calculate_NPV = TRUE)
NPV_rice_chili <- discount(rice_chili_result, discount_rate, calculate_NPV = TRUE)
# Cashflow
cashflow_crop_rotation <- crop_rotation_result - rice_cultivation_result
cashflow_rice_soybean <- rice_soybean_result - rice_cultivation_result
cashflow_rice_chili <- rice_chili_result - rice_cultivation_result
# Generate the list of outputs from the Monte Carlo simulation
return(list(Rice_NPV = NPV_rice,
crop_rotation_NPV = NPV_crop_rotation,
rice_soybean_NPV = NPV_rice_soybean,
rice_chili_NPV= NPV_rice_chili,
NPV_decision_crop_rotation = NPV_crop_rotation - NPV_rice,
NPV_decision_rice_soybean = NPV_rice_soybean - NPV_rice,
NPV_decision_rice_chili = NPV_rice_chili - NPV_rice,
cashflow_crop_rotation = cashflow_crop_rotation,
cashflow_rice_soybean = cashflow_rice_soybean,
cashflow_rice_chili = cashflow_rice_chili
))
}
# Run the Monte Carlo simulation using the model function
input_estimates <- read.csv("new_variable_estimates.csv", sep=";")
crop_rotation_mc_simulation <- mcSimulation(estimate = as.estimate(input_estimates),
model_function = crop_rotation_decision,
numberOfModelRuns = 1000,
functionSyntax = "plainNames")
# Run the Monte Carlo simulation using the model function
input_estimates <- read.csv("new_variable_estimates.csv", sep=";")
crop_rotation_mc_simulation <- mcSimulation(estimate = as.estimate(input_estimates),
model_function = crop_rotation_decision,
numberOfModelRuns = 1000,
functionSyntax = "plainNames")
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("crop_rotation_NPV", "Rice_NPV"),
method = 'smooth_simple_overlay')
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("crop_rotation_NPV", "Rice_NPV"),
method = 'boxplot')
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("NPV_decision_crop_rotation"),
method = 'boxplot_density')
## Warning: The following aesthetics were dropped during statistical transformation: x
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("rice_soybean_NPV","Rice_NPV"),
method = 'smooth_simple_overlay')
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("rice_soybean_NPV","Rice_NPV"),
method = 'boxplot')
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("NPV_decision_rice_soybean"),
method = 'boxplot_density')
## Warning: The following aesthetics were dropped during statistical transformation: x
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("rice_chili_NPV","Rice_NPV"),
method = 'smooth_simple_overlay')
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("rice_chili_NPV","Rice_NPV"),
method = 'boxplot')
decisionSupport::plot_distributions(mcSimulation_object = crop_rotation_mc_simulation,
vars = c("NPV_decision_rice_chili"),
method = 'boxplot_density')
## Warning: The following aesthetics were dropped during statistical transformation: x
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
plot_cashflow(mcSimulation_object = crop_rotation_mc_simulation, cashflow_var_name = "cashflow_crop_rotation")
plot_cashflow(mcSimulation_object = crop_rotation_mc_simulation, cashflow_var_name = "cashflow_rice_soybean")
plot_cashflow(mcSimulation_object = crop_rotation_mc_simulation, cashflow_var_name = "cashflow_rice_chili")
mcSimulation_table <- data.frame(crop_rotation_mc_simulation$x, crop_rotation_mc_simulation$y[1:7])
evpi_crop_rotation <- multi_EVPI(mc = mcSimulation_table, first_out_var = "crop_rotation_NPV")
## [1] "Processing 6 output variables. This can take some time."
## [1] "Output variable 1 (crop_rotation_NPV) completed."
## [1] "Output variable 2 (rice_soybean_NPV) completed."
## [1] "Output variable 3 (rice_chili_NPV) completed."
## [1] "Output variable 4 (NPV_decision_crop_rotation) completed."
## [1] "Output variable 5 (NPV_decision_rice_soybean) completed."
## [1] "Output variable 6 (NPV_decision_rice_chili) completed."
plot_evpi(evpi_crop_rotation, decision_vars = "NPV_decision_crop_rotation")
evpi_rice_soybean <- multi_EVPI(mc = mcSimulation_table, first_out_var = "rice_soybean_NPV")
## [1] "Processing 5 output variables. This can take some time."
## [1] "Output variable 1 (rice_soybean_NPV) completed."
## [1] "Output variable 2 (rice_chili_NPV) completed."
## [1] "Output variable 3 (NPV_decision_crop_rotation) completed."
## [1] "Output variable 4 (NPV_decision_rice_soybean) completed."
## [1] "Output variable 5 (NPV_decision_rice_chili) completed."
plot_evpi(evpi_rice_soybean, decision_vars = "NPV_decision_rice_soybean")
evpi_rice_chili <- multi_EVPI(mc = mcSimulation_table, first_out_var = "rice_chili_NPV")
## [1] "Processing 4 output variables. This can take some time."
## [1] "Output variable 1 (rice_chili_NPV) completed."
## [1] "Output variable 2 (NPV_decision_crop_rotation) completed."
## [1] "Output variable 3 (NPV_decision_rice_soybean) completed."
## [1] "Output variable 4 (NPV_decision_rice_chili) completed."
plot_evpi(evpi_rice_chili, decision_vars = "NPV_decision_rice_chili")
pls_result_crop_rotation <- plsr.mcSimulation(object = crop_rotation_mc_simulation,
resultName = names(crop_rotation_mc_simulation$y)[5], ncomp = 1)
plot_pls(pls_result_crop_rotation, threshold = 0)
pls_result_rice_soybean <- plsr.mcSimulation(object = crop_rotation_mc_simulation,
resultName = names(crop_rotation_mc_simulation$y)[6], ncomp = 1)
plot_pls(pls_result_rice_soybean, threshold = 0)
pls_result_rice_chili <- plsr.mcSimulation(object = crop_rotation_mc_simulation,
resultName = names(crop_rotation_mc_simulation$y)[7], ncomp = 1)
plot_pls(pls_result_rice_chili, threshold = 0)
compound_figure(mcSimulation_object = crop_rotation_mc_simulation,
input_table = input_estimates, plsrResults = pls_result_crop_rotation,
EVPIresults = evpi_crop_rotation, decision_var_name = "NPV_decision_crop_rotation",
cashflow_var_name = "cashflow_crop_rotation",
base_size = 7)
compound_figure(mcSimulation_object = crop_rotation_mc_simulation,
input_table = input_estimates, plsrResults = pls_result_rice_soybean,
EVPIresults = evpi_rice_soybean, decision_var_name = "NPV_decision_rice_soybean",
cashflow_var_name = "cashflow_rice_soybean",
base_size = 7)
compound_figure(mcSimulation_object = crop_rotation_mc_simulation,
input_table = input_estimates, plsrResults = pls_result_rice_chili,
EVPIresults = evpi_rice_chili, decision_var_name = "NPV_decision_rice_chili",
cashflow_var_name = "cashflow_rice_chili",
base_size = 7)
1.We recommend Indonesian smallholder farmers to implement crop rotation either for three crops (rice, soybean, and chili) or two crops (rice and chili) as it seems more profitable than growing rice only all year around.
2.However, we would not recommend to implement crop rotation between rice and soybean as it seems not so profitable.